import Ember from 'ember';

export default Ember.Route.extend({
	notify: Ember.inject.service('notify'),
	actions: {
		willTransition: function(transition) {
			console.log(this.controller.get('username'));
			if (!this.controller.get('username')) {
				this.get('notify').warning('请输入昵称!');
				transition.abort();
			}
		}
	}
});
